import { IPSControl } from './ipscontrol';
import { IPSControlAction } from './ipscontrol-action';
import { IPSControlNavContext } from './ipscontrol-nav-context';
import { IPSControlNavParam } from './ipscontrol-nav-param';

/**
 *
 * @export
 * @interface IPSSDControl
 */
export interface IPSSDControl extends IPSControl {
  /**
   * 当前数据属性
   * @type {string}
   */
  activeDataField: string;

  /**
   * 建立数据行为
   *
   * @type {IPSControlAction}
   */
  getCreatePSControlAction(): IPSControlAction | null;

  /**
   * 获取草稿数据行为（拷贝）
   *
   * @type {IPSControlAction}
   */
  getGetDraftFromPSControlAction(): IPSControlAction | null;

  /**
   * 获取草稿数据行为
   *
   * @type {IPSControlAction}
   */
  getGetDraftPSControlAction(): IPSControlAction | null;

  /**
   * 获取数据行为
   *
   * @type {IPSControlAction}
   */
  getGetPSControlAction(): IPSControlAction | null;

  /**
   * 部件导航上下文集合
   *
   * @type {IPSControlNavContext[]}
   */
  getPSControlNavContexts(): IPSControlNavContext[] | null;

  findPSControlNavContext(objKey: any): IPSControlNavContext | null;

  /**
   * 部件导航参数集合
   *
   * @type {IPSControlNavParam[]}
   */
  getPSControlNavParams(): IPSControlNavParam[] | null;

  findPSControlNavParam(objKey: any): IPSControlNavParam | null;

  /**
   * 删除数据行为
   *
   * @type {IPSControlAction}
   */
  getRemovePSControlAction(): IPSControlAction | null;

  /**
   * 更新数据行为
   *
   * @type {IPSControlAction}
   */
  getUpdatePSControlAction(): IPSControlAction | null;

  /**
   * 当前数据模式
   * @type {boolean}
   * @default false
   */
  activeDataMode: boolean;

  /**
   * 只读模式
   * @type {boolean}
   * @default false
   */
  readOnly: boolean;
}
